/**
 * @param {number} n
 * @return {number}
*/
var numWays = function(n) {
  if(n == 0 || n == 1) return 1;
  let lastOne = 1, lastTwo = 2, result = 0;
  for(let i = 2; i < n; i++) {
    result = Math.max(lastOne + 2, lastTwo + 1);
  }
  return result;
};
let n = 2;
console.log(numWays(n));
n = 7;
console.log(numWays(n));
n = 0;
console.log(numWays(n));
